package com.koala.learn.threadlearn;

/**
 * @Description TODO
 * @Date 2022/3/20 16:19
 * @Created by koala
 */

public class Main {

    private static final int MAX = 6;

    public static void main(String[] args) throws InterruptedException {
        Thread[] threads = new Thread[100];
        for (int i = 0; i < MAX; i++) {
            threads[i] = new Thread(new Cook("thread:" + i));
        }
        for (int i = 0; i < MAX; i++) {
            threads[i].start();
            Thread.sleep(900);
            threads[i].join();
        }
        System.out.println("main end");
    }
}
